<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use DB;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        // View::share('header', 'value');
		// 监听查询事件
		DB::listen(function ($query) {
            // echo  $query->sql.'<br/>';
            // $query->bindings;
			// sql执行时间
            // $query->time;
        });
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}
